﻿using BCEntity.OA.PageBusiness.PageBusinessMappingDepartment;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace BCData.OA.PageBusiness.PageBusinessMappingDepartment
{
    /// <summary>
    /// OA系统页面业务映射部门
    /// </summary>
    public interface IPageBusinessMappingDepartmentData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="pageBusinessMappingDepartmentId">OA系统页面业务映射部门Id</param>
        Task<bool> Exists(long pageBusinessMappingDepartmentId);
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="pageBusinessMappingDepartmentName">OA系统页面业务映射部门名称</param>
        Task<bool> Exists(string pageBusinessMappingDepartmentName);
        /// <summary>
        /// 增加OA系统页面业务映射部门
        /// </summary>
        /// <param name="entity">OA系统页面业务映射部门信息</param>
        Task<PageBusinessMappingDepartmentEntity> Add(PageBusinessMappingDepartmentEntity entity);
        /// <summary>
        /// 更新OA系统页面业务映射部门
        /// </summary>
        /// <param name="entity">OA系统页面业务映射部门信息</param>
        Task<PageBusinessMappingDepartmentEntity> Update(PageBusinessMappingDepartmentEntity entity);
        /// <summary>
        /// 删除OA系统页面业务映射部门
        /// </summary>
        /// <param name="pageBusinessMappingDepartmentId">OA系统页面业务映射部门Id</param>
        Task<bool> Delete(long pageBusinessMappingDepartmentId);
        /// <summary>
        /// 获取OA系统页面业务映射部门
        /// </summary>
        /// <param name="pageBusinessMappingDepartmentId">OA系统页面业务映射部门Id</param>
        Task<PageBusinessMappingDepartmentEntity> GetEntity(long pageBusinessMappingDepartmentId);
        /// <summary>
        /// 获取OA系统页面业务映射部门列表
        /// </summary>
        /// <param name="pageBusinessConfigId">OA系统页面业务配置Id</param>
        Task<IEnumerable<PageBusinessMappingDepartmentEntity>> GetEntitiesByPageBusinessConfigId(long pageBusinessConfigId);
        
        /// <summary>
        /// 获取OA系统页面业务映射部门列表
        /// </summary>
        /// <param name="companyId">公司Id</param>
        Task<IEnumerable<PageBusinessMappingDepartmentEntity>> GetList(int companyId);
        /// <summary>
        /// 获取OA系统页面业务映射部门列表
        /// </summary>
        /// <param name="companyId">公司Id</param>
        /// <param name="pageBusinessConfigId">页面业务配置Id</param>
        Task<IEnumerable<PageBusinessMappingDepartmentEntity>> GetList(int companyId, long pageBusinessConfigId);
        /// <summary>
        /// 获取OA系统页面业务映射部门分页列表
        /// </summary>
        /// <param name="companyId">公司Id</param>
        /// <param name="pageBusinessConfigId">页面业务配置Id</param>
        /// <param name="pageBusinessName">页面业务名称</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">OA系统页面业务映射部门每页数据条数</param>
        Task<(IEnumerable<PageBusinessMappingDepartmentEntity>, int)> Query(int companyId, long pageBusinessConfigId,string pageBusinessName, DateTime? start, DateTime? end, int pageIndex, int pageSize);
        #endregion  成员方法
    }
}
